package com.kupurui.asteacher.adapter;

import android.content.Context;
import android.text.Html;
import android.widget.TextView;

import com.android.frame.adapter.CommonAdapter;
import com.android.frame.adapter.ViewHolder;
import com.kupurui.asteacher.R;
import com.kupurui.asteacher.bean.PreReleaseInfo;
import com.kupurui.asteacher.bean.PreviewInfo;
import com.kupurui.asteacher.utils.URLImageParser;

import java.util.List;

/**
 * Created by Administrator on 2017/8/24.
 */

public class PreReleaseChildAdapter extends CommonAdapter<PreReleaseInfo.QuesBean.OptionBean> {


    public PreReleaseChildAdapter(Context context, List<PreReleaseInfo.QuesBean.OptionBean> mList, int itemLayoutId) {
        super(context, mList, itemLayoutId);
    }

    @Override
    public void convert(ViewHolder holder, PreReleaseInfo.QuesBean.OptionBean item, int positon) {
        TextView tvOption = holder.getView(R.id.tv_option);
        TextView tvRadio = holder.getView(R.id.tv_radio);
        tvOption.setText(item.getXuanxiang());
        tvRadio.setText(Html.fromHtml(item.getAnswer(), new URLImageParser(mContext,tvRadio), null));
    }
}
